package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.SysSignEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 系统签名表对象 sys_sign
 *
 * @author ym
 * @date 2020-08-17
 */
@ApiModel("系统签名表-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysSignUpdateParam extends BeanCovert<SysSignEntity> {

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("机构名称")
    @Size(max = 128, message = "机构名称长度超过{max}", groups = {Add.class, Update.class})
    private String orgName;

    @ApiModelProperty("机构编码")
    @Size(max = 64, message = "机构编码长度超过{max}", groups = {Add.class, Update.class})
    private String orgCode;

    @ApiModelProperty("应用关键字")
    @Size(max = 500, message = "应用关键字长度超过{max}", groups = {Add.class, Update.class})
    private String appKey;

    @ApiModelProperty("应用接口秘钥")
    @Size(max = 1000, message = "应用接口秘钥长度超过{max}", groups = {Add.class, Update.class})
    private String appSecret;

    @ApiModelProperty("生效时间")
    private Date validTime;

}
